package com.android.kotlincoroutinemvvmdemo

import android.app.Activity
import android.appwidget.AppWidgetHost
import android.appwidget.AppWidgetHostView
import android.appwidget.AppWidgetManager
import android.appwidget.AppWidgetProvider
import android.appwidget.AppWidgetProviderInfo
import android.content.Context
import android.os.Bundle
import android.util.Log
import android.widget.RemoteViews
import androidx.appcompat.app.AppCompatActivity
import com.android.kotlincoroutinemvvmdemo.base.BaseActivity
import com.android.kotlincoroutinemvvmdemo.databinding.ActivityFlingTestBinding

class FlingTestActivity : BaseActivity<ActivityFlingTestBinding>() {

    override fun getLayoutId() = R.layout.activity_fling_test

    override fun init(savedInstanceState: Bundle?) {

        var appWidget: AppWidgetProvider? = null
        var appWidgetManager: AppWidgetManager? = null
        var appWidgetHost: AppWidgetHost? = null
        var appWidgetProviderInfo: AppWidgetProviderInfo? = null
        var appWidgetHostView: AppWidgetHostView? = null
        var remoteViews: RemoteViews? = null

        Log.d(TAG, "系统常用类String:${String::class.java.classLoader}")
        Log.d(TAG, "系统常用类ArrayList:${ArrayList::class.java.classLoader}")

        Log.d(TAG, "应用程序自定义FlingTestActivity:${FlingTestActivity::class.java.classLoader}")
        Log.d(TAG, "SDK中的Activity:${AppCompatActivity::class.java.classLoader}")

        Log.d(TAG, "系统类Activity:${Activity::class.java.classLoader}")
        Log.d(TAG, "系统类Context:${Context::class.java.classLoader}")

        Log.d(TAG, "SDK的中Context的classLoader:${this@FlingTestActivity.classLoader}")
        Log.d(TAG, "Context getBaseContext()的classLoader:${baseContext.classLoader}")

        Log.d(TAG, "系统类Context的ClassLoader的parent:${this@FlingTestActivity.classLoader.parent}")
    }

    companion object {
        private const val TAG = "FlingTestActivity0011"
    }
}